package io.afu.nginxhelper.dto;

import io.afu.nginxhelper.constant.NgxConst;
import io.afu.nginxhelper.utils.StringUtils;

public class User {

    public final String KEY = "user";

    private String user;

    private String group;

    @Override
    public String toString() {
        String theUser = KEY+ NgxConst.SEP;
        if (!StringUtils.isNotEmpty(user) && !StringUtils.isNotEmpty(group)){
            return "";
        }
        theUser += user + NgxConst.SEP;
        if (group != null){
            theUser += group;
        }

        theUser += NgxConst.END_MARK;
        return theUser;
    }
}
